* {
    /* 初始化页面,清除页面元素默认样式 */
    padding: 0;
    margin: 0;
}

html, 
body {
    height: 100%;
}

body {
    /* 设置背景颜色 */
    background: linear-gradient(to right, rgb(255, 175, 201), rgb(255, 252, 220));
}

body,
main,
.navbar,
.navbar ul {
    /* 设置元素为弹性布局*/
    display: flex;
    justify-content: center;
    align-items: center;
}


.main {
    text-shadow: 0 3px 6px rgba(0,0,0,.5);
    font-weight: 400;
    font-family: 'Long Cang',cursive;
}

.navbar {
    /* 设置相对定位 */
    position: relative;
    padding: 20px;
    border-radius: 50px;
    background-color: rgba(255, 255, 255, 0.7);
}

.navbar input {
    width: 40px;
    height: 40px;
    /* 设置鼠标样式 */
    cursor: pointer;
    /* 设置input不透明度为0,看不到,但是可以点击 */
    opacity: 0;
}

.navbar span {
    /* 绝对定位 */
    position: absolute;
    left: 25px;
    /* 此处两条线统一高度,后面第二条线重新设计高度 calc 自动计算 */
    top: calc(50% - 10px);
    width: 30px;
    height: 4px;
    border-radius: 15px;
    background-color: #999999;
    /* 设置span鼠标穿透 */
    pointer-events: none;

    transition: top 0.3s ease-in-out , 
    top 0.3s ease-in-out 0.3s;

}

/* 第二条线在第三个元素位置,此处写3 */
.navbar span:nth-child(3) {
    top: calc(50% + 6px);
}

.navbar ul {
    width: 0;
    overflow: hidden;
    transition: all 0.5s;

    /* 让文字排成一行 */
    white-space: nowrap;
}

.navbar ul li {
    list-style: none;
    margin: 0 15px;
}

.navbar ul li a {
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
    color: #333333;
}

.navbar ul li a:hover {
    color:  rgb(255, 175, 201);
}

/* 当复选框 选中的时候, 查找后面同一级的兄弟ul  ~ 兄弟选择器 */
.navbar input:checked ~ ul {
    width: 350px;
}


.navbar input:checked ~ span:nth-child(2) {
    top: calc(50% - 2px);
    transform: rotate(45deg);
    background-color: rgb(255, 175, 201);

    transition: top 0.3s ease-in-out , 
    transform 0.3s ease-in-out 0.3s;
    
}

.navbar input:checked ~ span:nth-child(3) {
    top: calc(50% - 2px);
    transform: rotate(-45deg);
    background-color: rgb(255, 175, 201);
    transition: top 0.3s ease-in-out , 
    transform 0.3s ease-in-out 0.3s;
}

.foot {
    position: absolute;
    bottom: 0px;
    text-align: center;
}

.foot a {
    text-decoration: none;
    color: #333333;
}


/* popupBox start */
#popupBox {
    position: fixed;
    top: calc(50% - 20px);
    left: calc(50% - 80px);
    height: 40px;
    width: 160px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 16px;
    line-height: 40px;
    text-align: center;
    border-radius: 10px;
    transition: 0.5s;
    opacity: 0;
    pointer-events: none;
    z-index: 3;  /* 这里根据你的层级来改 */

}
/* popupBox end */